//
//  CenterDetailViewController.swift
//  许鲜
//
//  Created by hbl on 16/4/27.
//  Copyright © 2016年 hbl. All rights reserved.
//

import UIKit

class CenterDetailViewController: UIViewController {
    var message:String?
    @IBOutlet weak var mainWeb: UIWebView!
    override func viewDidLoad() {
        super.viewDidLoad()

       let request = NSURLRequest(URL: NSURL(string: message!)!)
        mainWeb.loadRequest(request)
        
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "关闭", style: UIBarButtonItemStyle.Plain, target: self, action: #selector(CenterDetailViewController.close))
    }

    func close(){
        dismissViewControllerAnimated(true, completion: nil)
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
